package com.ikun.service;

import com.ikun.pojo.Business;
import com.ikun.pojo.Order;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


public interface OrderService {
    List<Order> getAllOrder(Integer userId);

    Order getOrderById(Integer id);

    List<Business> getBusinessByUserIdAndTypeId(Integer userId, Integer typeId);
    //添加订单,添加的字段为userId,businessId,price,shippingAddress,
    public int addOrder(Integer userId,Integer businessId,Float price,String shippingAddress);
    //根据用户id查询订单表中的对应的商家信息
    public Map<Integer,Object> getOrderBusinessInfo(Integer userId);
    //根据orderId修改order_status
    public int updateOrderStatus(Integer orderId,Integer orderStatus);
    public List<Business> getBuyBusiness(Integer userId);
}
